﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Painter3D
{
    static class Log
    {
        static List<KeyValuePair<string, string>> messages = new List<KeyValuePair<string, string>>();
        public static void LogOut(string message, string tag)
        {
            throw new Exception(message);
            for (int i = 0; i < messages.Count; i++)
            {
                if (messages[i].Key == tag)
                {
                    if (messages[i].Value != message)
                    {
                        Console.WriteLine(message);
                        messages.RemoveAt(i);
                        messages.Add(new KeyValuePair<string, string>(tag, message));
                    }
                    return;
                }
            }
            Console.WriteLine(message);
            messages.Add(new KeyValuePair<string, string>(tag, message));
        }
    }
}
